package com.bootdo.system.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bootdo.system.dao.SearchHistoryMapper;
import com.bootdo.system.domain.SearchHistory;
import com.bootdo.system.service.SearchHistoryService;
import com.github.pagehelper.PageHelper;



@Service("searchHistoryService")
public class SearchHistoryServiceImpl implements SearchHistoryService {
	@Autowired
	private SearchHistoryMapper mapper;

	@Override
	public SearchHistory get(Long id) {
		return mapper.get(id);
	}

	@Override
	public List<SearchHistory> list(Map<String, Object> map) {
		PageHelper.startPage(Integer.parseInt(map.get("pageNum").toString()),Integer.parseInt(map.get("pageSize").toString()));
		return mapper.list(map);
	}

	@Override
	public int save(SearchHistory bComments) {
		return mapper.save(bComments);
	}

	@Override
	public int update(SearchHistory bComments) {
		return mapper.update(bComments);
	}

	@Override
	public int remove(Long id) {
		return mapper.remove(id);
	}

	@Override
	public int batchRemove(Integer[] ids) {
		return mapper.batchRemove(ids);
	}

}
